package com.xhsj.user.hr.system.entity;

import com.google.common.collect.Lists;
import com.xhsj.user.hr.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 菜单权限表
 * </p>
 *
 * @author suxl
 * @since 2020-08-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_global_menu")
public class TbGlobalMenu extends BaseEntity<TbGlobalMenu> {

    private static final long serialVersionUID = 1L;

    /**
     * 菜单名称
     */
    @TableField("menu_name")
    private String menuName;

    /**
     * 父菜单ID
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 父菜单名称
     */
    @TableField(exist = false)
    private String parentName;

    /**
     * 所有父节点
     */
    @TableField("parent_ids")
    private String parentIds;

    /**
     * 显示顺序
     */
    @TableField("order_num")
    private Integer orderNum;

    /**
     * 请求地址
     */
    @TableField("url")
    private String url;

    /**
     * 类型:M目录,C菜单,F按钮
     */
    @TableField("menu_type")
    private String menuType;

    /**
     * 菜单状态:0显示,1隐藏
     */
    @TableField("visible")
    private Integer visible;

    /**
     * 权限标识
     */
    @TableField("perms")
    private String perms;

    /**
     * 菜单图标
     */
    @TableField("icon")
    private String icon;


    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<TbGlobalMenu> children= Lists.newArrayList();


}
